import { ref } from "vue";
import { Condition, SelectedCondition } from "./props";

export const useFilter = () => {
  const selectedConditions = ref<SelectedCondition>({});

  const allConditaions = ref<Condition[]>([]);

  const showFilter = ref<boolean>(false);
  const toggleFileter = () => {
    showFilter.value = !showFilter.value;
  };

  return {
    selectedConditions,
    allConditaions,
    showFilter,
    toggleFileter,
  };
};
